#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int m, n;
	int flag = 0;
	scanf("%d%d", &m, &n);//100 <= m < n <= 999
	int x, y, z;
	for (int i = m; i <= n; i++)
	{
		x = i % 10;
		y = (i / 10) % 10;
		z = i / 100;
		if (x*x*x + y*y*y + z*z*z == i)
		{
			printf("%d ", i);
			flag = 1;
		}
	}
	if (flag == 0)
	{
		printf("no\n");
	}
	return 0;
}